The distributed plc system of the floodgate ' s opening measuring presented by the paper has many advantages such as high reliable operation , high measuring precision , having the network communication function , convenient installation and correction , etc . this thesis further studies the key device for the floodgate ' s opening measuring , the rotary encoder , selects the absolute rotary encoder adopting the binary cyclic code , studies the method for transforming the cyclic code to the binary data and according to the transforming formula designs the ladder diagram program 本論文研制的分布式plc閘門開度測量系統(tǒng)具有工作可靠、測量精度高、具有聯(lián)網(wǎng)通信功能、安裝和校正方便等特點(diǎn)。本論文深入研究了閘門開度檢測的關(guān)鍵器件? ?旋轉(zhuǎn)編碼器,選用了采用二進(jìn)制循環(huán)碼編碼的絕對式旋轉(zhuǎn)編碼器,研究了將二進(jìn)制循環(huán)碼轉(zhuǎn)換為二進(jìn)制數(shù)的方法,根據(jù)轉(zhuǎn)換公式設(shè)計(jì)了plc的梯形圖轉(zhuǎn)換程序。